const pool = require("../connection/sqlPool");

async function GETTABLE(){
    const promisePool = pool.promise();
    const [rows,fileds] = await promisePool.query(`SELECT * FROM User`);
    // console.log(rows);
    // console.log(fileds);
    return rows;

}

async function GETUSER(){
    const promisePool = pool.promise();
    const [rows,fileds] = await promisePool.query(`SELECT * FROM Word`);
    // console.log(rows);
    // console.log(fileds);
    return rows;

}

async function GETONESELF(){
    const promisePool = pool.promise();
    const [rows,fileds] = await promisePool.query(`SELECT * FROM Manager where controlName=?`);
    // console.log(rows);
    // console.log(fileds);
    return rows;

}


module.exports={GETTABLE,GETUSER}